package com.study.portal.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.study.portal.dao.IBbsDao;
import com.study.portal.pojo.Bbs;

@SuppressWarnings("unchecked")
public class BbsDaoImpl extends SqlMapClientDaoSupport implements IBbsDao {

    public int save(Bbs bbs) {
        int id = (Integer)this.getSqlMapClientTemplate().insert("INSERT_BBS",bbs);
        return id;
    }

    public List<Bbs> queryList(Bbs queryForm) {
        List<Bbs> list =  getSqlMapClientTemplate().queryForList("QUERY_BBS_LIST", queryForm);
        if(null!=list){
            return list;
        }
        return null;
    }
}
